home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / cmdlnc.zip / CMDLN.HPP < prev   
C/C++ Source or Header  |  1991-04-03  |  723b  |  42 lines

  1. /*
  2.  
  3.     cmdln.hpp
  4.     3-8-91
  5.     Command line option parser
  6.  
  7.     Copyright 1991
  8.     John W. Small
  9.     All rights reserved
  10.     Use freely but acknowledge authorship and copyright.
  11.     CIS: 73757,2233
  12.  
  13.     PSW / Power SoftWare
  14.     P.O. Box 10072
  15.     McLean, Virginia 22102 8072
  16.     (703) 759-3838
  17.  
  18. */
  19.  
  20.  
  21. #ifndef CMDLN_CPP
  22. #define CMDLN_CPP
  23.  
  24. class CmdLn  {
  25.     char **argv, *options, *opt;
  26.     int  argc, optEnd;
  27.     int  argi;
  28. public:
  29.     char optCh, optNot, *optArg;
  30.     void CmdLnReset(int argc, char *argv[],
  31.         char *options);
  32.     CmdLn(int argc, char *argv[], char *options)
  33.         { CmdLnReset(argc,argv,options); }
  34.     int  Argi()  { return argi; }
  35.     int  getOption(void);
  36.     void nextCluster(void);
  37.     void lookForMoreOptions(void);
  38. };
  39.  
  40. #endif
  41.  
  42.